var status = -1;
var selectionLog = [];

function start(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.curNodeEventEnd(true);
            qm.setInGameDirectionMode(true, false, true);
            qm.fieldEffect_PlayBGM("Bgm00.img/Silence", 0, 0);
            qm.inGameDirectionEvent_AskAnswerTime(1000)
        } else {
            if (status === a++) {
                qm.inGameDirectionEvent_AskAnswerTime(5000);
                qm.effect_Voice("SoundEff.img/BandNoise", 100)
            } else {
                if (status === a++) {
                    qm.sendNormalTalk_Bottom("嗬，你刚才听到了吗？从屋顶上传来了很可怕的声音，难道发生了袭击吗？", 37, 1530030, false, true)
                } else {
                    if (status === a++) {
                        qm.sendNormalTalk_Bottom("应该是乐器的声音吧……", 57, 0, true, true)
                    } else {
                        if (status === a++) {
                            qm.sendNormalTalk_Bottom("#b(我得上屋顶看看。)#k", 57, 0, true, true)
                        } else {
                            if (status === a++) {
                                qm.forceStartQuest(33511, "");
                                qm.setInGameDirectionMode(false, true, false);
                                qm.dispose()
                            }
                        }
                    }
                }
            }
        }
    }
}

function end(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.sendNormalTalk_Bottom("辛苦你了，#h0#。现在我们开始正式练习吧？", 37, 1530120, false, true);
            qm.gainItem(4034346, -10)
        } else {
            if (status === a++) {
                qm.gainExp(Math.pow(qm.getLevel(), 3));
                qm.forceCompleteQuest(33511);
                qm.dispose();
                qm.warp(330002610, 0)
            }
        }
    }
};